package top.faig.blog.common.service;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import top.faig.blog.code.common.entity.Ip;
import top.faig.blog.code.common.mapper.IpMapper;

import java.util.List;

@Service
@RequiredArgsConstructor
public class IpService extends ServiceImpl<IpMapper, Ip> {

    private final IpMapper ipMapper;

    public List<Ip> testing(Ip ip){

        return ipMapper.selectList(Wrappers.<Ip>lambdaQuery()
                .eq(Ip::getIp, ip.getIp()));
    }


}
